<script>
  // let obj = { uname: "张三", age: 21 }
  // Object.defineProperty(obj,"age",{
  //   enumerable:false
  // })

  // // console.log(obj.age)
  // // console.log(Object.keys(obj))
  // for(let key in obj){
  //   console.log(key)
  // }


  let data = { uname: "张三" }

  let vm = new Proxy(data, {
    get(data, prop) {
      // return data[prop]
      return Reflect.get(data, prop)
    },
    set(data, prop, val) {
      // data[prop] = val
      Reflect.set(data, prop, val)
    }
  })

  // data.uname = "李四"
  data.age = 21
  console.log(vm)
  // console.log(data['[[Target]]'])






  // let obj = { uname: "张三" }
  // console.log(obj['uname'])
  // let result = Reflect.get(obj, "uname")
  // console.log(result)

  // obj['uname'] = "李四"
  // Reflect.set(obj,"uname","李四")
  // console.log(obj)



</script>